#ifndef __COLORIDO_H__
#define __COLORIDO_H__

#include "list.h"
#include <sys/types.h>
#include <pthread.h>
#include <event.h>

#define FALSE (0) 
#define TRUE (!FALSE)

typedef struct _ctrler{
	struct event ev;
	int sock;
	list *que;
	list *modules;
	pthread_mutex_t mutex;
	pthread_cond_t cond;
}ctrler;

typedef struct _coner{
	struct event ev;
	int sock;
	struct timeval tv;
	ctrler *base;
}coner;


typedef struct _qsend{
	char *req;
	coner *con;
}qsend;


coner *alloc_coner();
void free_coner(coner *);


#endif
